<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="bootstrap-3.3.7-dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/system.css" />
<script type="text/javascript" src="js/jquery-3.3.1.js"></script>
<script type="text/javascript"
	src="bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<title>系统管理员</title>
</head>
<body>
	<div class="all">
		<div class="tops">
			<h2>宿舍管理系统</h2>
		</div>
		<div class="row nav-ce">
			<div class="col-md-2">
				<div class="panel-group table-responsive" role="tablist">
					<div class="panel panel-primary leftMenu">
						<!-- 利用data-target指定要折叠的分组列表 -->
						<div class="panel-heading" id="collapseListGroupHeading1"
							data-toggle="collapse" data-target="#collapseListGroup1"
							role="tab">
							<h4 class="panel-title" onclick="wel()">
								<span style="cursor: pointer;">首页</span> <span
									class="glyphicon glyphicon-chevron-right first"></span>
							</h4>
						</div>
						<!-- .panel-collapse和.collapse标明折叠元素 .in表示要显示出来 -->
						<div id="collapseListGroup1" class="panel-collapse collapse in"
							role="tabpanel" aria-labelledby="collapseListGroupHeading1">
							<ul class="list-group">
								<li class="list-group-item"><a onclick="dormManager()">宿舍管理员管理</a><span
									class="glyphicon glyphicon-chevron-right gray"></span></li>
								<li class="list-group-item"><a onclick="stuManager()">学生管理</a><span
									class="glyphicon glyphicon-chevron-right gray"></span></li>
								<li class="list-group-item"><a onclick="towerManager()">宿舍楼管理</a><span
									class="glyphicon glyphicon-chevron-right gray"></span></li>
								<li class="list-group-item"><a onclick="absenceManager()">缺勤管理</a><span
									class="glyphicon glyphicon-chevron-right gray"></span></li>
								<li class="list-group-item"><a onclick="updatePwd()">修改密码</a><span
									class="glyphicon glyphicon-chevron-right gray"></span></li>
								<li class="list-group-item"><a href="logSystem">退出系统</a><span
									class="glyphicon glyphicon-chevron-right gray"></span></li>
							</ul>
						</div>
					</div>
					<!--panel end-->
				</div>
			</div>
			<div class="col-md-10">
				<div class="wel allNav">
					<h1 class="welcome">欢迎您，系统管理员</h1>
				</div>
				<div class="dormManager allNav" style="display: none;">
					<div style="border: 1px #ddd solid; padding: 1em 0.5em;">
						<b>宿舍管理员管理</b>
						<hr style="margin: 0.5em 0 0.3em 0;" />
						<div class="row tableTop">
							<div class="col-md-9">
								<a type="button" class="btn btn-success btn-sm"
									data-toggle="modal" data-target="#insertDromManger">添加</a>
							</div>
							<div class="col-md-3">
								<div class="row">
									<div class="col-md-1"></div>
									<div class="col-md-3 search">
										<div class="btn-group">
											<button type="button"
												class="btn btn-default btn-sm dropdown-toggle"
												data-toggle="dropdown" aria-haspopup="true"
												aria-expanded="false">
												姓名 <span class="caret"></span>
											</button>
											<ul class="dropdown-menu">
												<li><a href="#">电话</a></li>
												<li><a href="#">用户名</a></li>
											</ul>
										</div>
									</div>
									<div class="col-md-5 search">
										<input type="text" class="form-control input-sm">
									</div>
									<div class="col-md-2 search">
										<a type="button" class="btn btn-info btn-sm">搜索</a>
									</div>
								</div>
							</div>
						</div>
						<!-- Modal -->
						<div class="modal fade" id="insertDromManger" tabindex="-1"
							role="dialog" aria-labelledby="myModalLabel">
							<div class="modal-dialog" role="document">
								<div class="modal-content">
									<div class="modal-body">
										<form class="form-horizontal" action="addDormManager"
											method="post">
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>用户名</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hUName">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>密码</label>
												<div class="col-sm-7">
													<input type="password" class="form-control" name="hPwd">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>确认密码</label>
												<div class="col-sm-7">
													<input type="password" class="form-control" name="pwd2">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>姓名</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hName">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>性别</label>
												<div class="col-sm-7">
													<select class="form-control" name="hSex">
														<option>男</option>
														<option>女</option>
													</select>
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>联系电话</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hPhone">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>宿舍楼</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hDorm">
												</div>
											</div>
											<div class="form-group">
												<div class="col-sm-offset-2 col-sm-10">
													<input type="submit" class="btn btn-primary" value="提交" />
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>
						<!-- Modal -->
						<div class="modal fade" id="updateStuManger" tabindex="-1"
							role="dialog" aria-labelledby="myModalLabel">
							<div class="modal-dialog" role="document">
								<div class="modal-content">
									<div class="modal-body">
										<form class="form-horizontal" action="update" method="post">
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>用户名</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hUName">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>密码</label>
												<div class="col-sm-7">
													<input type="password" class="form-control" name="hPwd">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>确认密码</label>
												<div class="col-sm-7">
													<input type="password" class="form-control" name="pwd2">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>姓名</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hName">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>性别</label>
												<div class="col-sm-7">
													<select class="form-control" name="hSex">
														<option>男</option>
														<option>女</option>
													</select>
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>联系电话</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hPhone">
												</div>
											</div>
											<div class="form-group">
												<label class="col-sm-2 control-label"><font
													color="red">*</font>宿舍楼</label>
												<div class="col-sm-7">
													<input type="text" class="form-control" name="hDorm">
												</div>
											</div>
											<div class="form-group">
												<div class="col-sm-offset-2 col-sm-10">
													<input type="submit" class="btn btn-primary" value="提交" />
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>
						<div class="table-responsive">
							<table class="table table-bordered table-hover">
								<thead>
									<tr>
										<th>编号</th>
										<th>姓名</th>
										<th>性别</th>
										<th>电话</th>
										<th>宿舍楼</th>
										<th>用户名</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="content">

								</tbody>
							</table>
						</div>

						<div class="row">
							<div class="col-md-5"></div>
							<div class="col-md-7">
								<nav aria-label="Page navigation">
								<ul class="pagination">
									<li><a href="#"> 首页 </a></li>
									<li class="disabled"><a href="#" aria-label="Previous">上一页</a>
									</li>
									<li class="disabled"><a href="#">1</a></li>
									<li><a href="#">2</a></li>
									<li><a href="#" aria-label="Next">下一页</a></li>
									<li><a href="#">尾页</a></li>
								</ul>
								</nav>
							</div>
						</div>
					</div>
				</div>
				<div class="stuManager allNav" style="display: none;">
					<div style="border: 1px #ddd solid; padding: 1em 0.5em;">
						<b>学生信息管理</b>
						<hr style="margin: 0.5em 0 0.3em 0;" />
						<div class="row tableTop">
							<div class="col-md-8">
								<!-- Button trigger modal -->
								<button type="button" class="btn btn-success btn-sm"
									data-toggle="modal" data-target="#insertStu">添加</button>
								<!-- Modal -->
								<div class="modal fade" id="insertStu" tabindex="-1"
									role="dialog" aria-labelledby="myModalLabel">
									<div class="modal-dialog" role="document">
										<div class="modal-content">
											<div class="modal-body">
												<form class="form-horizontal" action="addStu" method="post">
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>学号
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="stuId">
														</div>
													</div>
													<div class="form-group">
														<label for="inputPassword3" class="col-sm-4 control-label">
															<font color="red">*</font>密码
														</label>
														<div class="col-sm-6">
															<input type="password" class="form-control" name="stuPwd">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>确认密码
														</label>
														<div class="col-sm-6">
															<input type="password" class="form-control" name="pwd2">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>姓名
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="stuName">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>性别
														</label>
														<div class="col-sm-6">
															<select class="form-control" name="stuSex">
																<option>男</option>
																<option>女</option>
															</select>
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>宿舍楼
														</label>
														<div class="col-sm-6">
															<select class="form-control" name="stuDrom">
																<option>1栋</option>
																<option>2栋</option>
															</select>
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>寝室
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="stuDromId">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>联系电话
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="stuPhone">
														</div>
													</div>
													<div class="form-group">
														<div class="col-sm-offset-2 col-sm-10">
															<button type="submit" class="btn btn-primary">提交</button>
														</div>
													</div>
												</form>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-4">
								<div class="row">
									<div class="col-md-4 search">
										<div class="btn-group">
											<button type="button"
												class="btn btn-default btn-sm dropdown-toggle"
												data-toggle="dropdown" aria-haspopup="true"
												aria-expanded="false">
												全部宿舍楼 <span class="caret"></span>
											</button>
											<ul class="dropdown-menu">
												<li><a href="#">1栋</a></li>
												<li><a href="#">2栋</a></li>
											</ul>
										</div>
									</div>
									<div class="col-md-3 search">
										<div class="btn-group">
											<button type="button"
												class="btn btn-default btn-sm dropdown-toggle"
												data-toggle="dropdown" aria-haspopup="true"
												aria-expanded="false">
												姓名 <span class="caret"></span>
											</button>
											<ul class="dropdown-menu">
												<li><a href="#">电话</a></li>
												<li><a href="#">用户名</a></li>
											</ul>
										</div>
									</div>
									<div class="col-md-3 search">
										<input type="text" class="form-control input-sm">
									</div>
									<div class="col-md-2 search">
										<a type="button" class="btn btn-info btn-sm">搜索</a>
									</div>
								</div>
							</div>
						</div>
						<div class="table-responsive">
							<table class="table table-bordered table-hover">
								<thead>
									<tr>
										<th>学号</th>
										<th>姓名</th>
										<th>性别</th>
										<th>宿舍楼</th>
										<th>寝室</th>
										<th>电话</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="stuContent">

								</tbody>
							</table>
						</div>
						<!-- Modal -->
						<div class="modal fade" id="updateStu" tabindex="-1" role="dialog"
							aria-labelledby="myModalLabel">
							<div class="modal-dialog" role="document">
								<div class="modal-content">
									<div class="modal-body">
										<form class="form-horizontal">
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-4 control-label">
													<font color="red">*</font>学号
												</label>
												<div class="col-sm-6">
													<input type="email" class="form-control" name="uname">
												</div>
											</div>
											<div class="form-group">
												<label for="inputPassword3" class="col-sm-4 control-label">
													<font color="red">*</font>密码
												</label>
												<div class="col-sm-6">
													<input type="password" class="form-control" name="upwd">
												</div>
											</div>
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-4 control-label">
													<font color="red">*</font>确认密码
												</label>
												<div class="col-sm-6">
													<input type="email" class="form-control" name="pwd2">
												</div>
											</div>
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-4 control-label">
													<font color="red">*</font>姓名
												</label>
												<div class="col-sm-6">
													<input type="email" class="form-control" name="systemName">
												</div>
											</div>
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-4 control-label">
													<font color="red">*</font>性别
												</label>
												<div class="col-sm-6">
													<select class="form-control">
														<option name="usex">男</option>
														<option name="usex">女</option>
													</select>
												</div>
											</div>
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-4 control-label">
													<font color="red">*</font>宿舍楼
												</label>
												<div class="col-sm-6">
													<select class="form-control">
														<option name="drom">1栋</option>
														<option name="drom">2栋</option>
													</select>
												</div>
											</div>
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-4 control-label">
													<font color="red">*</font>寝室
												</label>
												<div class="col-sm-6">
													<input type="email" class="form-control" name="phone">
												</div>
											</div>
											<div class="form-group">
												<label for="inputEmail3" class="col-sm-4 control-label">
													<font color="red">*</font>联系电话
												</label>
												<div class="col-sm-6">
													<input type="email" class="form-control" name="phone">
												</div>
											</div>
											<div class="form-group">
												<div class="col-sm-offset-2 col-sm-10">
													<button type="submit" class="btn btn-primary">提交</button>
												</div>
											</div>
										</form>
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-5"></div>
							<div class="col-md-7">
								<nav aria-label="Page navigation">
								<ul class="pagination">
									<li><a href="#"> 首页 </a></li>
									<li class="disabled"><a href="#" aria-label="Previous">上一页</a>
									</li>
									<li class="disabled"><a href="#">1</a></li>
									<li><a href="#">2</a></li>
									<li><a href="#" aria-label="Next">下一页</a></li>
									<li><a href="#">尾页</a></li>
								</ul>
								</nav>
							</div>
						</div>
					</div>
				</div>
				<div class="towerManager allNav" style="display: none;">
					<div style="border: 1px #ddd solid; padding: 1em 0.5em;">
						<b>宿舍楼管理</b>
						<hr style="margin: 0.5em 0 0.3em 0;" />
						<div class="row tableTop">
							<div class="col-md-9">
								<!-- Button trigger modal -->
								<button type="button" class="btn btn-success btn-sm"
									data-toggle="modal" data-target="#insertDrom">添加</button>
								<!-- Modal -->
								<div class="modal fade" id="insertDrom" tabindex="-1"
									role="dialog" aria-labelledby="myModalLabel">
									<div class="modal-dialog" role="document">
										<div class="modal-content">
											<div class="modal-body">
												<form class="form-horizontal" action="addTower"
													method="post">
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>编号
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="dormId">
														</div>
													</div>
													<div class="form-group">
														<label for="inputPassword3" class="col-sm-4 control-label">
															<font color="red">*</font>名称
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="dormName">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>简介
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="dormMess">
														</div>
													</div>
													<div class="form-group">
														<div class="col-sm-offset-4 col-sm-10">
															<button type="submit" class="btn btn-primary">提交</button>
														</div>
													</div>
												</form>
											</div>
										</div>
									</div>
								</div>
								<!-- Modal -->
								<div class="modal fade" id="updateDrom" tabindex="-1"
									role="dialog" aria-labelledby="myModalLabel">
									<div class="modal-dialog" role="document">
										<div class="modal-content">
											<div class="modal-body">
												<form class="form-horizontal">
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>编号
														</label>
														<div class="col-sm-6">
															<input type="email" class="form-control" name="uname">
														</div>
													</div>
													<div class="form-group">
														<label for="inputPassword3" class="col-sm-4 control-label">
															<font color="red">*</font>名称
														</label>
														<div class="col-sm-6">
															<input type="password" class="form-control" name="upwd">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>简介
														</label>
														<div class="col-sm-6">
															<input type="email" class="form-control" name="pwd2">
														</div>
													</div>
													<div class="form-group">
														<div class="col-sm-offset-4 col-sm-10">
															<button type="submit" class="btn btn-primary">提交</button>
														</div>
													</div>
												</form>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="row">
									<div class="col-md-7 search">
										<input type="text" class="form-control input-sm">
									</div>
									<div class="col-md-5 search">
										<a type="button" class="btn btn-info btn-sm">搜索</a>
									</div>
								</div>
							</div>
						</div>
						<div class="table-responsive">
							<table class="table table-bordered table-hover">
								<thead>
									<tr>
										<th>编号</th>
										<th>名称</th>
										<th>简介</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="towerContent">

								</tbody>
							</table>
						</div>
						<div class="row">
							<div class="col-md-5"></div>
							<div class="col-md-7">
								<nav aria-label="Page navigation">
								<ul class="pagination">
									<li><a href="#"> 首页 </a></li>
									<li class="disabled"><a href="#" aria-label="Previous">上一页</a>
									</li>
									<li class="disabled"><a href="#">1</a></li>
									<li><a href="#">2</a></li>
									<li><a href="#" aria-label="Next">下一页</a></li>
									<li><a href="#">尾页</a></li>
								</ul>
								</nav>
							</div>
						</div>
					</div>
				</div>
				<div class="absenceManager allNav" style="display: none;">
					<div style="border: 1px #ddd solid; padding: 1em 0.5em;">
						<b>缺勤管理</b>
						<hr style="margin: 0.5em 0 0.3em 0;" />
						<div class="row tableTop">
							<div class="col-md-9">
								<!-- Button trigger modal -->
								<button type="button" class="btn btn-success btn-sm"
									data-toggle="modal" data-target="#myModal">添加</button>
								<!-- Modal -->
								<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
									aria-labelledby="myModalLabel">
									<div class="modal-dialog" role="document">
										<div class="modal-content">
											<div class="modal-body">
												<form class="form-horizontal" action="addAbs" method="post">
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>日期
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="absenceDate">
														</div>
													</div>
													<div class="form-group">
														<label for="inputPassword3" class="col-sm-4 control-label">
															<font color="red">*</font>学号
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="stuId">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>姓名
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="stuName">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>宿舍楼
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control"
																name="dorm">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>寝室
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="dormId">
														</div>
													</div>
													<div class="form-group">
														<label for="inputEmail3" class="col-sm-4 control-label">
															<font color="red">*</font>备注
														</label>
														<div class="col-sm-6">
															<input type="text" class="form-control" name="remark">
														</div>
													</div>
													<div class="form-group">
														<div class="col-sm-offset-4 col-sm-10">
															<button type="submit" class="btn btn-primary">提交</button>
														</div>
													</div>
												</form>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="col-md-3">
								<div class="row">
									<div class="col-md-4 search">
										<div class="btn-group">
											<button type="button"
												class="btn btn-default btn-sm dropdown-toggle"
												data-toggle="dropdown" aria-haspopup="true"
												aria-expanded="false">
												全部宿舍楼 <span class="caret"></span>
											</button>
											<ul class="dropdown-menu">
												<li><a href="#">1栋</a></li>
												<li><a href="#">2栋</a></li>
											</ul>
										</div>
									</div>
									<div class="col-md-3 search">
										<div class="btn-group">
											<button type="button"
												class="btn btn-default btn-sm dropdown-toggle"
												data-toggle="dropdown" aria-haspopup="true"
												aria-expanded="false">
												姓名 <span class="caret"></span>
											</button>
											<ul class="dropdown-menu">
												<li><a href="#">电话</a></li>
												<li><a href="#">用户名</a></li>
											</ul>
										</div>
									</div>
									<div class="col-md-3 search">
										<input type="text" class="form-control input-sm">
									</div>
									<div class="col-md-2 search">
										<a type="button" class="btn btn-info btn-sm">搜索</a>
									</div>
								</div>
							</div>
						</div>
						<div class="table-responsive">
							<table class="table table-bordered table-hover">
								<thead>
									<tr>
										<th>日期</th>
										<th>学号</th>
										<th>姓名</th>
										<th>宿舍楼</th>
										<th>寝室</th>
										<th>备注</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody id="absContent">

								</tbody>
							</table>
						</div>
						<div class="row">
							<div class="col-md-5"></div>
							<div class="col-md-7">
								<nav aria-label="Page navigation">
								<ul class="pagination">
									<li><a href="#"> 首页 </a></li>
									<li class="disabled"><a href="#" aria-label="Previous">上一页</a>
									</li>
									<li class="disabled"><a href="#">1</a></li>
									<li><a href="#">2</a></li>
									<li><a href="#" aria-label="Next">下一页</a></li>
									<li><a href="#">尾页</a></li>
								</ul>
								</nav>
							</div>
						</div>
					</div>
				</div>
				<%-- <div class="addManager allNav" style="display: none;">
					<b>添加管理员</b>
					<hr style="margin: 0.5em 0 0.3em 0;" />
					<form class="form-horizontal" action="addDormManager" method="post">
						<div class="form-group">
							<label class="col-sm-2 control-label"><font color="red">*</font>用户名</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" name="hUName">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"><font color="red">*</font>密码</label>
							<div class="col-sm-3">
								<input type="password" class="form-control" name="hPwd">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"><font color="red">*</font>确认密码</label>
							<div class="col-sm-3">
								<input type="password" class="form-control" name="pwd2">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"><font color="red">*</font>姓名</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" name="hName">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"><font color="red">*</font>性别</label>
							<div class="col-sm-3">
								<select class="form-control" name="hSex">
									<option>男</option>
									<option>女</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"><font color="red">*</font>联系电话</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" name="hPhone">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label"><font color="red">*</font>宿舍楼</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" name="hDorm">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<input type="submit" class="btn btn-primary" value="提交" />
							</div>
						</div>
					</form>
				</div> --%>
				<div class="updatePwd allNav" style="display: none;">
					<b>修改密码</b>
					<hr style="margin: 0.5em 0 0.3em 0;" />
					<form class="form-horizontal" action="updatePwd" method="post">
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label"><font
								color="red">*</font>用户名</label>
							<div class="col-sm-3">
								<input type="text" class="form-control" name="uname">
							</div>
						</div>
						<div class="form-group">
							<label for="inputPassword3" class="col-sm-2 control-label"><font
								color="red">*</font>密码</label>
							<div class="col-sm-3">
								<input type="password" class="form-control" name="upwd">
							</div>
						</div>
						<div class="form-group">
							<label for="inputEmail3" class="col-sm-2 control-label"><font
								color="red">*</font>确认密码</label>
							<div class="col-sm-3">
								<input type="password" class="form-control" name="pwd2">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button type="submit" class="btn btn-primary">提交</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		//左侧导航点击隐藏别的显示当前的
		function wel() {
			$(".allNav").attr("style", "display: none;");
			$(".wel").attr("style", "display: block;");
		}

		function dormManager() {
			$(".allNav").attr("style", "display: none;");
			$(".dormManager").attr("style", "display: block;");
			$
					.ajax({
						type : "post",
						url : "selectDormManager",
						data : "",
						dataType : "json",
						success : function(data) {
							/*  alert(data);*/
							var html = "";
							$
									.each(
											$.parseJSON(data),
											function(i, item) {
												html += "<tr><td>"
														+ item.hId
														+ "</td><td>"
														+ item.hName
														+ "</td><td>"
														+ item.hSex
														+ "</td><td>"
														+ item.hPhone
														+ "</td><td>"
														+ item.hDorm
														+ "</td><td>"
														+ item.hUName
														+ "</td><td><a class='btn btn-info btn-xs' data-toggle='modal' data-target='#updateStuManger'>修改</a> &nbsp; <a onclick='deleteManager("
														+ item.hId
														+ ")' class='btn btn-danger btn-xs'>删除</a></td></tr>";
											})
							$('#content').html(html);
						},
						error : function() {
							alert("失败！！！");
						}
					});
		}

		function stuManager() {
			$(".allNav").attr("style", "display: none;");
			$(".stuManager").attr("style", "display: block;");
			$
					.ajax({
						type : "post",
						url : "selectStu",
						data : "",
						dataType : "json",
						success : function(data) {
							/* alert(data); */
							var html = "";
							$
									.each(
											$.parseJSON(data),
											function(i, item) {
												html += "<tr><td>"
														+ item.stuId
														+ "</td><td>"
														+ item.stuName
														+ "</td><td>"
														+ item.stuSex
														+ "</td><td>"
														+ item.stuDrom
														+ "</td><td>"
														+ item.stuDromId
														+ "</td><td>"
														+ item.stuPhone
														+ "</td><td><a class='btn btn-info btn-xs' data-toggle='modal' data-target='#updateStu'>修改</a> <a class='btn btn-danger btn-xs' onclick='deleteStu("
														+ item.sId
														+ ")' >删除</a></td></tr>";
											})
							$('#stuContent').html(html);
						},
						error : function() {
							alert("失败！！！");
						}
					});
		}

		function towerManager() {
			$(".allNav").attr("style", "display: none;");
			$(".towerManager").attr("style", "display: block;");
			$
					.ajax({
						type : "post",
						url : "selectTower",
						data : "",
						dataType : "json",
						success : function(data) {
							/* alert(data); */
							var html = "";
							$
									.each(
											$.parseJSON(data),
											function(i, item) {
												html += "<tr><td>"
														+ item.dormId
														+ "</td><td>"
														+ item.dormName
														+ "</td><td>"
														+ item.dormMess
														+ "</td><td><a class='btn btn-info btn-xs'>管理员</a> <a class='btn btn-info btn-xs' data-toggle='modal' data-target='#updateDrom'>修改</a> <a class='btn btn-danger btn-xs' onclick='deleteTower("
														+ item.dormId
														+ ")' >删除</a></td></tr>";
											})
							$('#towerContent').html(html);
						},
						error : function() {
							alert("失败！！！");
						}
					});
		}

		function absenceManager() {
			$(".allNav").attr("style", "display: none;");
			$(".absenceManager").attr("style", "display: block;");
			$
					.ajax({
						type : "post",
						url : "selectAbs",
						data : "",
						dataType : "json",
						success : function(data) {
							/* alert(data); */
							var html = "";
							$
									.each(
											$.parseJSON(data),
											function(i, item) {
												html += "<tr><td>"
														+ item.absenceDate
														+ "</td><td>"
														+ item.stuId
														+ "</td><td>"
														+ item.stuName
														+ "</td><td>"
														+ item.dorm
														+ "</td><td>"
														+ item.dormId
														+ "</td><td>"
														+ item.remark
														+ "</td><td><a class='btn btn-danger btn-xs' onclick='deleteAbs("
														+ item.absenceId
														+ ")' >删除</a></td></tr>";
											})
							$('#absContent').html(html);
						},
						error : function() {
							alert("失败！！！");
						}
					});
		}

		function addManager() {
			$(".allNav").attr("style", "display: none;");
			$(".addManager").attr("style", "display: block;");
		}

		function updatePwd() {
			$(".allNav").attr("style", "display: none;");
			$(".updatePwd").attr("style", "display: block;");
		}
		/* 删除宿管 */
		function deleteManager(id) {
			/* alert(1);
			alert(id); */
			$.ajax({
				type : "post",
				url : "delete",
				data : {
					id : id
				},
				dataType : "json",
				success : function(data) {
					if (data == "1") {
						alert("删除成功!");
						dormManager();
					}
				},

				error : function() {
					alert("删除失败");
				}
			});
		}
		/* 删除学生信息 */
		function deleteStu(sId) {
			/* alert(stuId); */
			$.ajax({
				type : "post",
				url : "deleteStu",
				data : {
					stuId : sId
				},
				dataType : "json",
				success : function(data) {
					if (data == "1") {
						alert("删除成功!");
						stuManager();
					}
				},

				error : function() {
					alert("删除失败");
				}
			});
		}
		/* 删除宿舍楼信息 */
		function deleteTower(dormId) {
			/* alert(stuId); */
			$.ajax({
				type : "post",
				url : "deleteTower",
				data : {
					dormId : dormId
				},
				dataType : "json",
				success : function(data) {
					if (data == "1") {
						alert("删除成功!");
						towerManager();
					}
				},

				error : function() {
					alert("删除失败");
				}
			});
		}
		/* 删除缺勤信息 */
		function deleteAbs(absenceId) {
			/* alert(stuId); */
			$.ajax({
				type : "post",
				url : "deleteAbs",
				data : {
					absenceId : absenceId
				},
				dataType : "json",
				success : function(data) {
					if (data == "1") {
						alert("删除成功!");
						absenceManager();
					}
				},

				error : function() {
					alert("删除失败");
				}
			});
		}
	</script>
</body>

</html>